package cn.js.feign;

import cn.js.dto.User;
import cn.js.feign.fallback.UserFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "user-server",fallbackFactory = UserFeignClientFallback.class, contextId = "user1")
public interface UserFeignClient {

    @GetMapping("/pay/user/{id}")
    User getById(@PathVariable Long id);

}